package org.example.Polls;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

public class SOAPDateFormatter {
	
	private static SOAPDateFormatter instance = null;
	
	//private DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
	private DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
	
	private SOAPDateFormatter() {
	}
	
	public static SOAPDateFormatter getInstance() {
		if (instance == null) {
			instance = new SOAPDateFormatter();
		}
		return instance;
	}
	
	public String format (Date date) {
		return dateFormat.format(date);
	}
}
